#ifndef MUSICTABLE_H
#define MUSICTABLE_H
#include <QStandardItemModel>
#include <QTableView>
#include <map>
#include <QAction>
#include <QMenu>
#include "newsongdialog.h"
#include "editsongdialog.h"
#include "playlist.h"

class MusicTable : public QTableView
{
    Q_OBJECT
    public:
        explicit MusicTable(QWidget *parent = 0);
        ~MusicTable();

        void addToPlaylistMenu(QAction* act);
        VideoInfo getHighlightedVideo();

    signals:
        void songClicked(VideoInfo vid);
        void editClicked();
        void deleteSongFromPlaylist(VideoInfo vid);

    public slots:
        //void editSong();
        void songClicked(QModelIndex Data);
        void filter(QString word);
        void loadPlaylist(Playlist);
        void onDeleteClicked();



    private:
        QStandardItemModel* model;
        std::vector<VideoInfo> vids;

        QAction* editAct;
        QAction* deleteAct;
        QAction* addSongAct;
        QList<QAction*> playlistActs;
        QMenu* addMenu;
};

#endif // MUSICTABLE_H
